package com.example.web.system.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author kimido
 * @since 2024-07-04
 */
@Getter
@Setter
@TableName("sys_menu")
@ApiModel(value = "SysMenu对象", description = "")
public class SysMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "menu_id", type = IdType.AUTO)
    private Integer menuId;

    private Integer parentId;//父级菜单

    private String moduleLabel;//菜单名称

    private String menuCode;//权限码

    private String name;//路由名称

    private String path;//路由地址

    private String url;//组件路由

    private Integer type;//类名： 0目录。1菜单，2按钮

    private String icon;//图标

    private Integer orderNum;//排序字段

    private String remark;

    private String parentName;//上级菜单名称

    @TableLogic
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private List<SysMenu> children =new ArrayList<>();


}
